package com.ido.dingding.domain;

import com.alibaba.fastjson2.JSONObject;
import lombok.Data;

import java.security.Signature;
import java.util.Collections;
import java.util.List;

@Data
public class FeedCardMsg {

    private String msgtype = "feedCard";

    // links
    private List<FeedCardLink> links;

    public String getJSONString() {
        JSONObject json = new JSONObject();
        json.put("msgtype", this.getMsgtype());
        json.put("feedCard", Collections.singletonMap("links", this.getLinks()));
        return json.toJSONString();
    }
}

